package com.jason.quectel0805.receivers;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

/**
 * @author：Jason
 * @date：2022/8/5 16:40
 * @email：1129847330@qq.com
 * @description:
 */
public class MyBroadcastReceiver extends BroadcastReceiver {
    private static final String TAG = "jasonwan";

    @Override
    public void onReceive(Context context, Intent intent) {
        Toast.makeText(context, "我收到广播了", Toast.LENGTH_SHORT).show();
        String battery = intent.getStringExtra("battery");
        Log.d(TAG, "onReceive: battery=" + battery);
    }
}